from xmltree import `$`
from htmlparser import parseHtml
import nimquery

let html = """
<!DOCTYPE html>
<html>
  <head><title>Example</title></head>
  <body>
    <p id = "first" >1</p>
    <p  class = "second" >2</p>
    <p>3</p>
    <p>4</p>
  </body>
</html>
"""
let xml = parseHtml(html) 
echo  xml  
let elements = xml.querySelectorAll("#first")
let item  = xml.querySelectorAll(".second")
echo elements , "\n", item   

